#!/usr/bin/env bash

# send files are a record of acks sent
# recv files are a record of data packets received
# full files include all recorded packets for a connection

./analyze starting/rtt_trace.pcap "src host ec2-54-242-80-150.compute-1.amazonaws.com" > data/rtt_trace.send.dat
./analyze starting/rtt_trace.pcap "dst host ec2-54-242-80-150.compute-1.amazonaws.com" > data/rtt_trace.recv.dat
./analyze starting/rtt_trace.pcap "src or dst host ec2-54-242-80-150.compute-1.amazonaws.com" > data/rtt_trace.full.dat
./get_cwnd.sh           data/rtt_trace.full.dat > data/rtt_trace.full.cwnd.dat
./get_unused_buffer.sh  data/rtt_trace.full.dat > data/rtt_trace.full.unused_buffer.dat
./get_rtt.rb            data/rtt_trace.full.dat > data/rtt_trace.full.rtt.dat
./get_tx_rate.rb        data/rtt_trace.full.dat > data/rtt_trace.full.tx_rate.dat


./analyze starting/airplane_large_out.pcap "src host 172.19.131.96" > data/airplane_large_out.send.dat
./analyze starting/airplane_large_out.pcap "dst host 172.19.131.96" > data/airplane_large_out.recv.dat
./analyze starting/airplane_large_out.pcap "src or dst host 172.19.131.96" > data/airplane_large_out.full.dat
./get_cwnd.sh           data/airplane_large_out.full.dat > data/airplane_large_out.full.cwnd.dat
./get_unused_buffer.sh  data/airplane_large_out.full.dat > data/airplane_large_out.full.unused_buffer.dat
./get_rtt.rb            data/airplane_large_out.full.dat > data/airplane_large_out.full.rtt.dat
./get_tx_rate.rb        data/airplane_large_out.full.dat > data/airplane_large_out.full.tx_rate.dat


./analyze starting/comcast_large_out.pcap "src host 192.168.5.162" > data/comcast_large_out.send.dat
./analyze starting/comcast_large_out.pcap "dst host 192.168.5.162" > data/comcast_large_out.recv.dat
./analyze starting/comcast_large_out.pcap "src or dst host 192.168.5.162" > data/comcast_large_out.full.dat
./get_cwnd.sh           data/comcast_large_out.full.dat > data/comcast_large_out.full.cwnd.dat
./get_unused_buffer.sh  data/comcast_large_out.full.dat > data/comcast_large_out.full.unused_buffer.dat
./get_rtt.rb            data/comcast_large_out.full.dat > data/comcast_large_out.full.rtt.dat
./get_tx_rate.rb        data/comcast_large_out.full.dat > data/comcast_large_out.full.tx_rate.dat


./analyze starting/spr_by_window_large_out.pcap "src host 184.242.145.152" > data/spr_by_window_large_out.send.dat
./analyze starting/spr_by_window_large_out.pcap "dst host 184.242.145.152" > data/spr_by_window_large_out.recv.dat
./analyze starting/spr_by_window_large_out.pcap "src or dst host 184.242.145.152" > data/spr_by_window_large_out.full.dat
./get_cwnd.sh           data/spr_by_window_large_out.full.dat > data/spr_by_window_large_out.full.cwnd.dat
./get_unused_buffer.sh  data/spr_by_window_large_out.full.dat > data/spr_by_window_large_out.full.unused_buffer.dat
./get_rtt.rb            data/spr_by_window_large_out.full.dat > data/spr_by_window_large_out.full.rtt.dat
./get_tx_rate.rb        data/spr_by_window_large_out.full.dat > data/spr_by_window_large_out.full.tx_rate.dat


./analyze starting/spr_desk_large_out.pcap "src host 108.111.143.111" > data/spr_desk_large_out.send.dat
./analyze starting/spr_desk_large_out.pcap "dst host 108.111.143.111" > data/spr_desk_large_out.recv.dat
./analyze starting/spr_desk_large_out.pcap "src or dst host 108.111.143.111" > data/spr_desk_large_out.full.dat
./get_cwnd.sh           data/spr_desk_large_out.full.dat > data/spr_desk_large_out.full.cwnd.dat
./get_unused_buffer.sh  data/spr_desk_large_out.full.dat > data/spr_desk_large_out.full.unused_buffer.dat
./get_rtt.rb            data/spr_desk_large_out.full.dat > data/spr_desk_large_out.full.rtt.dat
./get_tx_rate.rb        data/spr_desk_large_out.full.dat > data/spr_desk_large_out.full.tx_rate.dat


./analyze starting/vzw_desk_large_out.pcap "src host 10.175.200.34" > data/vzw_desk_large_out.send.dat
./analyze starting/vzw_desk_large_out.pcap "dst host 10.175.200.34" > data/vzw_desk_large_out.recv.dat
./analyze starting/vzw_desk_large_out.pcap "src or dst host 10.175.200.34" > data/vzw_desk_large_out.full.dat
./get_cwnd.sh           data/vzw_desk_large_out.full.dat > data/vzw_desk_large_out.full.cwnd.dat
./get_unused_buffer.sh  data/vzw_desk_large_out.full.dat > data/vzw_desk_large_out.full.unused_buffer.dat
./get_rtt.rb            data/vzw_desk_large_out.full.dat > data/vzw_desk_large_out.full.rtt.dat
./get_tx_rate.rb        data/vzw_desk_large_out.full.dat > data/vzw_desk_large_out.full.tx_rate.dat

